package base;

public class Test4 {

    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder();
        sb.append("trj_app_t7_774235899457851392").append("trj_app_t7_774235896966434816");
        char[] arr = sb.toString().toCharArray();
        for (int i = 0; i < arr.length; i++) {
            for(int j=0;j<arr.length-1-i;j++){
                // 比较方式是> 0 <0 这样的比较。
                if(arr[j] > arr[j+1]){
                    // 数组元素间进行调换
                    swapArr(arr,j,j+1);
                }
            }
        }
        System.out.println(new String(arr));
    }

    private static void swapArr(char []arr,int start,int end){
        char temp=arr[start];
        arr[start]=arr[end];
        arr[end]=temp;
    }

    //11222333344444555566667777777888899999______aajjpppprrtttt
    //11222333344444555566667777777888899999______aajjpppprrtttt
}
